//
//  UIActivityIndicatorView+Rx.swift
//  Signup
//
//  Created by heze on 2018/9/30.
//  Copyright © 2018 apple. All rights reserved.
//

import Foundation
import RxSwift
import RxCocoa

extension Reactive where Base: UIActivityIndicatorView {
    
    public var isAnimating: Binder<Bool> {
        
        return Binder(base, binding: { (activityIndicator, active) in
            
            if active {
                activityIndicator.startAnimating()
            } else {
                activityIndicator.stopAnimating()
            }
        })
    }
}

